JBoss Community Archive (Read Only)

RHQ 4.10

Running the RHQ Storage Node

This page is only for those users that need to run a standalone RHQ Storage Node. If you installed your RHQ Storage Nodes on the same machines as your RHQ Server nodes, then you do not need to do anything separate. Running the RHQ Server using rhqctl will also start its associated RHQ Storage Node.

Running the RHQ Storage Node

The RHQ Storage Node is actually a customized Cassandra instance and will become a member of the Cassandra cluster that RHQ uses to persist data.

Running in Debug Mode

Sometimes you need the storage node launcher scripts to emit debug messages. To run the scripts in debug mode, define the environment variable RHQ_STORAGE_DEBUG to 'true'. To disable this debug mode, unset that environment variable, or set it to 'false'.

Running on Windows

The RHQ Storage Node is installed as a Windows service by the rhqctl install command. It is typically run as a service but can be run from within a console window.

Running in a Windows Console

Make sure the service is not running. And then execute the command {{rhqctl.bat console --storage }}.

The rhqctl.bat script looks for specific environment variables during its execution. These variables can be modified to suit your system requirements. For example, you can point the RHQ Storage Node at a new JVM. The comments at the top of the rhqctl.bat and rhq-storage.bat files contain a detailed list of these environment variables. You do not have to set any specific variables to get the RHQ Storage Node run; sensible defaults are used. These variables apply only to console operation.

Installing and Running as a Windows Service

Windows

Please review all of the information at Windows Installations prior to installing on Windows.

Execute the rhqctl.bat script with one of the following command line options:

  • install - This installs the RHQ Storage Node as a Windows service. At the prompt, enter the password of the user designated to run the server. The Windows service now starts the server during the system boot. You can change this behavior by modifying the wrapper configuration file described below.

  • start - This starts the Windows service, effectively starting the RHQ Storage Node. Ensure that you have run the rhqctl install --storage install command first. Alternatively, start the RHQ Storage Node by using the Windows Services Administrative Tool.

  • stop - This stops the Windows Service, effectively stopping the RHQ Storage Node. You must have installed and started the Windows Service first in order to stop it. Alternatively, stop the RHQ Storage Node by using the Windows Services Administrative Tool instead.

  • remove - This removes the Windows Service from your Windows operating system. If the service is running, it is first stopped. Once the service is removed, it is no longer started at boot time and you can no longer start it with the start option.

  • status - If the service is installed, this option informs you if the server is currently running or not.

Running on Unix

The RHQ Storage Node can run from a console window or run as a service started by the init process.

Setting Environment Variables

The rhqctl file, located in the <install-dir>/bin directory, contains a detailed list of the environment variables it requires to run. For most variables, sensible defaults are used and therefore do not need tweaking.

You can specify the path to the Java installation you want to use to run the RHQ Storage Node. Before starting the RHQ Storage Node, you can edit the rhqctl file and ensure that either the RHQ_JAVA_HOME or the RHQ_JAVA_EXE_FILE_PATH variable is set appropriately.

Running in a Console

To run the RHQ Storage Node in a console, execute the following commands as the root user:

# cd <install-dir>/bin
# ./rhqctl console --storage

Running with init.d

To ensure the RHQ Storage Node is started at boot time, the rhqctl script can be managed by the init process. The script must be copied to the appropriate location and the RHQ_SERVER_HOME variable must be set to the installation directory of the RHQ Storage Node. The exact procedure on how to do this varies between different flavors of UNIX. The example procedure below describes this process on Red Hat Enterprise Linux 5.2.

Unlike the Windows script, this UNIX script does not utilize the Java Service Wrapper utility.

Service Installation on Red Hat Enterprise Linux 5.2

The rhqctl script can be placed under the /etc/init.d directory and managed by the service and chkconfig command. To run the RHQ Storage Node as a service on Red Hat Enterprise Linux 5.2 and ensure that it starts in run level 5, follow the procedure below as the root user:

  1. Copy the rhqctl script into the /etc/init.d directory.

    cp <install-dir>/bin/rhqctl /etc/init.d
  2. Edit the /etc/init.d/rhqctl script and set the RHQ_SERVER_HOME variable to the RHQ Storage Node install directory. For example:

    RHQ_SERVER_HOME=/opt/rhq/rhq-server-4.8.0
  3. Edit the /etc/init.d/rhqctl script and add the following lines to the top of the file, directly under #!/bin/sh. The last two parameters in the #chkconfig: 2345 95 20 line specify the start and stop priority respectively; edit these accordingly.

    #!/bin/sh
    #chkconfig: 2345 95 20
    #description: RHQ Storage Node
    #processname: rhqctl
  4. Add the service to the chkconfig service management command.

    # chkconfig --add rhqctl
    # chkconfig rhqctl --list
  5. Ensure the service will start in run level 5.

    # chkconfig --level 5 rhqctl on

The RHQ Storage Node service can now be managed by the command:

service rhqctl { start | stop | status }

For example, to start the service, enter the following command:

# service rhqctl start
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 14:32:46 UTC, last content change 2013-10-28 19:13:59 UTC.